/*   Shotscreens
 *   Copyright (C) 2010, Vadim Zakondyrin (http://crystalnix.com)
 *
 *   This program is free software: you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation, either version 3 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include "ftp.h"
#include <QtNetwork/QFtp>



FTP::FTP(QObject *parent) :
        QObject(parent)
{
}

bool FTP::uploadMemory(const QByteArray &data)
{
    QFtp *ftp = new QFtp(this);
    ftp->connectToHost("192.168.0.197");
    ftp->login("Vadim", "spring");
    ftp->put(data, "c.png");
    ftp->close();

    return true;
}
bool FTP::GetPluginVersion(int &version, int &subversion)
{

}

bool FTP::ShowOptions()
{


    return true;
}

bool FTP::ShowAbout()
{

    return true;
}

void FTP::setLoginAndPassword(const QString &l, const QString &p)
{
    login = l;
    password = p;
}

Q_EXPORT_PLUGIN2(UPLOADER, FTP)
